<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" >
    <meta http-equiv="X-UA-Compatible" content="IE=11,IE=10,IE=9,IE=8" >
    <meta name="baidu-site-verification" content="iJemnNsV3M" />
    
    <title>Unity入门教程（一） | lupin</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" >
    <meta name="keywords" content="全栈" >
    <meta name="description" content="全栈" >

    
    <link rel="shortcut icon" href="/img/favicon.png" >
    
    
<link rel="stylesheet" href="/css/style.css">

    <!--[if lt IE 9]>
    
<script src="/js/html5.js"></script>

    <![endif]-->
    
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d5ebf515ab530cfbdda5f5c85093fb41";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


<meta name="generator" content="Hexo 4.2.0"></head>

<body class="home">
    <!--[if lt IE 9]>
    <div class="browsehappy">
        当前网页 <strong>不支持</strong>
        你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/" target="_blank" rel="noopener">升级你的浏览器</a>.
    </div>
    <![endif]-->

    <!-- 博客头部 -->
    <header class="header">
    <section class="container header-main">
        <div class="logo">
            <a href="/">
                <div class="cover">
                    <span class="name">lupin</span>
                    <span class="description">博客</span>
                </div>
            </a>
        </div>
        <div class="dropnav icon-paragraph-justify" id="ALLVAR__btnDropNav"></div>
        <ul class="menu hidden" id="ALLVAR__menu">
            
            <li rel="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/index.html" class="item ">
                <a href="/" title="首页" class="icon-home">&nbsp;首页</a>
            </li>
            
            <li rel="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/index.html" class="item ">
                <a href="/lab/" title="实验室" class="icon-lab">&nbsp;实验室</a>
            </li>
            
            <li rel="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/index.html" class="item ">
                <a href="/about/" title="关于" class="icon-about">&nbsp;关于</a>
            </li>
            
        </ul>
        <div class="profile clearfix">
            <div class="feeds fl">
                
                
                <p class="links">
                    
                        <a href="https://gitee.com/Shr9527" target="_blank">码云</a>
                        |
                    
                        <a href="https://gitee.com" target="_blank">Hosted by Gitee Pages</a>
                        
                    
                </p>
                <p class="sns">
                    
                    <a href="javascript: void(0);" class="wechat">
                        <b>■</b>
                        公众号
                        <span class="popover">
                            <img src="/img/wechat_mp.jpg" width="120" height="120" alt="我的微信订阅号">
                            <i class="arrow"></i>
                        </span>
                    </a>
                </p>
                
            </div>
            <div class="avatar fr">
                <img src="/img/favicon.png" alt="avatar" title="AllVar" >
            </div>
        </div>
    </section>
</header>


    <!-- 博客正文 -->
    <div class="container body clearfix">
        <section class="content">
            <div class="content-main widget">
                <!-- 文章页 -->
<!-- 文章 -->
<article class="post article">
    <header class="text-center">
        <h3 class="post-title"><span>Unity入门教程（一）</span></h3>
    </header>
    <p class="post-meta text-center">
         发表于
        <time datetime="2020-05-02T05:12:30.000Z">2020-05-02</time>
    </p>
    <div class="post-content">
        <h3 id="Unity安装"><a href="#Unity安装" class="headerlink" title="Unity安装"></a>Unity安装</h3><p>Unity 中文官网：<a href="https://unity.cn" target="_blank" rel="noopener">https://unity.cn</a></p>
<a id="more"></a>

<p>官网下载Unity Editor、Unity Hub:<br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/001.png" alt></p>
<h3 id="Unity-Hub"><a href="#Unity-Hub" class="headerlink" title="Unity Hub"></a>Unity Hub</h3><h4 id="1-登录Unity账号"><a href="#1-登录Unity账号" class="headerlink" title="1. 登录Unity账号"></a>1. 登录Unity账号</h4><h5 id="1-1-登录账户"><a href="#1-1-登录账户" class="headerlink" title="1.1 登录账户"></a>1.1 登录账户</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/002.png" alt></p>
<h5 id="1-2-登录账号-注册账号"><a href="#1-2-登录账号-注册账号" class="headerlink" title="1.2 登录账号 | 注册账号"></a>1.2 登录账号 | 注册账号</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/003.png" alt></p>
<h5 id="1-3-获取许可证"><a href="#1-3-获取许可证" class="headerlink" title="1.3 获取许可证"></a>1.3 获取许可证</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/004.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/005.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/006.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/007.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/008.png" alt></p>
<h5 id="1-5-Unity-Editor界面"><a href="#1-5-Unity-Editor界面" class="headerlink" title="1.5 Unity Editor界面"></a>1.5 Unity Editor界面</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/009.png" alt></p>
<h5 id="1-6-修改布局"><a href="#1-6-修改布局" class="headerlink" title="1.6 修改布局"></a>1.6 修改布局</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/010.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/011.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/012.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/013.png" alt><br><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/014.png" alt></p>
<h5 id="1-7-工作区"><a href="#1-7-工作区" class="headerlink" title="1.7 工作区"></a>1.7 工作区</h5><h6 id="工作区视图"><a href="#工作区视图" class="headerlink" title="工作区视图"></a>工作区视图</h6><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/015.png" alt></p>
<p>工作区视图主要有场景视图（scene view）和游戏视图（game view）。</p>
<h6 id="Scene-View的工具栏"><a href="#Scene-View的工具栏" class="headerlink" title="Scene View的工具栏"></a>Scene View的工具栏</h6><p>Scene view是我们的编辑视窗，类似Maya的4视图，操作方式也类似于Maya。可以切换不同的显示模式，过滤不同类型的场景元素，并调节透视/正交视图类型等等。Scene view并不对应某个场景摄影机（camera），属于引擎内置的camera视图。</p>
<h6 id="Game-View的工具栏"><a href="#Game-View的工具栏" class="headerlink" title="Game View的工具栏"></a>Game View的工具栏</h6><p>Game view是游戏运行视窗，相当于在引擎中直接运行我们制作的游戏。Shaded可以选择模型呈现方式；2D开启2D视图模式，后面3个按钮分别开关光照、声音和贴图效果；Gizmos可以选择哪些游戏物体的图标允许显示在场景视图中，以及Gizmos的缩放比例。</p>
<p>当按下菜单栏下方“运行游戏”按钮时，会自动切换显示Game view，并编译运行当前游戏项目，如果编译不成功则不会运行。编辑状态下Game view显示的也是我们设置好的游戏摄影机视图，部分UI元素不会在编辑状态下显示在game view中。</p>
<h5 id="1-8-面板"><a href="#1-8-面板" class="headerlink" title="1.8 面板"></a>1.8 面板</h5><p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/016.png" alt></p>
<p>默认界面中就显示出来的，或者说我们最常用的面板有如下几个：</p>
<h6 id="Hierarchy："><a href="#Hierarchy：" class="headerlink" title="Hierarchy："></a>Hierarchy：</h6><p>Hierarchy面板对应场景中的游戏物体的结构。我们可以通过菜单创建游戏物体，也可以点击面板上的Create来创建游戏物体（推荐），游戏物体只存在于场景中。</p>
<h6 id="Project："><a href="#Project：" class="headerlink" title="Project："></a>Project：</h6><p>Project面板对应游戏的资源目录结构，也就是我们项目文件夹中的Assets目录。同样可以点击面板上的Create来创建资源，资源存在于磁盘上，没有被使用的资源不被包含在游戏中。</p>
<h6 id="Inspector："><a href="#Inspector：" class="headerlink" title="Inspector："></a>Inspector：</h6><p>Inspector面板相当于“属性编辑器”，游戏物体和资源物体都具备各自的属性，都可以在Inspector中查看。</p>
<h6 id="Console："><a href="#Console：" class="headerlink" title="Console："></a>Console：</h6><p>控制台面板，用来查看各种info、warning、error信息。</p>
<p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/017.png" alt></p>
<h6 id="Animation："><a href="#Animation：" class="headerlink" title="Animation："></a>Animation：</h6><p>用来制作关键帧动画。</p>
<h6 id="Asset-Store："><a href="#Asset-Store：" class="headerlink" title="Asset Store："></a>Asset Store：</h6><p>在Unity3D中打开资源商店。</p>
<h6 id="Animator："><a href="#Animator：" class="headerlink" title="Animator："></a>Animator：</h6><p>“动画人”控制器，用来制作动画片段之间的切换控制。</p>
<h6 id="Window-gt-Rendering-gt-Lighting-Settings："><a href="#Window-gt-Rendering-gt-Lighting-Settings：" class="headerlink" title="Window &gt; Rendering &gt; Lighting Settings："></a>Window &gt; Rendering &gt; Lighting Settings：</h6><p>设置并进行光照烘焙（baking lightmap）。</p>
<p><img src="/2020/05/02/Unity/01.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89/018.png" alt></p>

    </div>
    <p class="post-meta">
        <span class="post-cat">分类：
            <a class="cat-link" href="/categories/%E5%90%8E%E7%AB%AF/">后端</a>
        </span>
        <span class="post-tags">
            标签：
            
    
        <a href="/tags/unity/" title="unity">unity</a> / 
    
        <a href="/tags/c/" title="c#">c#</a>
    

        </span>
    </p>
</article>
<!-- 分享按钮 -->

  <div class="article-share clearfix text-center">
    <div class="share-area">
      <span class="share-txt">分享到：</span>
      <a href="javascript: window.open('http://service.weibo.com/share/share.php?url=' + encodeURIComponent(location.href) + '&title=' + document.title + '&language=zh_cn');" class="share-icon weibo"></a>
      <a href="javascript: alert('请复制链接到微信并发送');" class="share-icon wechat"></a>
      <a href="javascript: window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(location.href) + '&title=' + document.title);" class="share-icon qqzone"></a>
      <a href="javascript: window.open('http://connect.qq.com/widget/shareqq/index.html?url=' + encodeURIComponent(location.href) + '&desc=AllVar个人博客&title=' + document.title + '&callback=' + encodeURIComponent(location.href));" class="share-icon qq"></a>
      <a href="javascript: window.open('http://shuo.douban.com/!service/share?href=' + encodeURIComponent(location.href) + '&name=' + document.title + '&text=' + document.title);" class="share-icon douban"></a>
    </div>
  </div>


<!-- 上一篇/下一篇 -->

<div class="article-nav clearfix">
    
    <span class="prev fl">
        上一篇<br >
        <a href="/2020/05/03/Unity/02.%20Unity%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B%EF%BC%88%E4%BA%8C%EF%BC%89/">
            
                Unity入门教程（二）
            
        </a>
    </span>
    

    
    <span class="next fr">
        下一篇<br >
        <a href="/2020/04/29/Cpp/08.%20%E6%9C%BA%E6%88%BF%E9%A2%84%E7%BA%A6%E7%B3%BB%E7%BB%9F/">
            
                机房预约系统
            
        </a>
    </span>
    
</div>

<!-- 文章评论 -->


            </div>

        </section>
        <!-- 侧栏部分 -->
<aside class="sidebar">
    
    <section class="widget">
        <h3 class="widget-hd"><strong>文章搜索</strong></h3>
        <div class="search-form">
  <form
    id="searchForm"
    method="GET"
    action="https://www.baidu.com/s"
    ectype="application/x-www-form-urlencoded"
    target="_blank"
    autocomplete="false"
    onsubmit="javascript: return false;">
    <input
      id="searchKeyword"
      type="text"
      class="form-control"
      placeholder="输入关键字搜索"
      autocomplete="false"
    />
    <input id="searchKeywordHidden" type="hidden" name="wd" />
    <input id="searchButton" class="btn" type="submit" value="搜索" />
  </form>
</div>
    </section>
    

    <section class="widget">
        <h3 class="widget-hd"><strong>文章分类</strong></h3>
        <!-- 文章分类 -->
<ul class="widget-bd">
    
    <li>
        <a href="/categories/%E5%90%8E%E7%AB%AF/">后端</a>
        <span class="badge">(20)</span>
    </li>
    
    <li>
        <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
        <span class="badge">(3)</span>
    </li>
    
    <li>
        <a href="/categories/%E5%B7%A5%E5%85%B7/">工具</a>
        <span class="badge">(2)</span>
    </li>
    
</ul>
    </section>

    
    <section class="widget">
        <h3 class="widget-hd"><strong>热门标签</strong></h3>
        <!-- 文章标签 -->
<div class="widget-bd tag-wrap">
  
    <a class="tag-item" href="/tags/centeros/" title="centeros">centeros (4)</a>
  
    <a class="tag-item" href="/tags/python/" title="python">python (1)</a>
  
    <a class="tag-item" href="/tags/docker/" title="docker">docker (6)</a>
  
    <a class="tag-item" href="/tags/cpp/" title="cpp">cpp (8)</a>
  
    <a class="tag-item" href="/tags/dotnet-core/" title="dotnet core">dotnet core (1)</a>
  
    <a class="tag-item" href="/tags/nginx/" title="nginx">nginx (1)</a>
  
    <a class="tag-item" href="/tags/redis/" title="redis">redis (2)</a>
  
    <a class="tag-item" href="/tags/unity/" title="unity">unity (3)</a>
  
    <a class="tag-item" href="/tags/c/" title="c#">c# (3)</a>
  
    <a class="tag-item" href="/tags/vue/" title="vue">vue (3)</a>
  
    <a class="tag-item" href="/tags/javascript/" title="javascript">javascript (3)</a>
  
    <a class="tag-item" href="/tags/visual-studio/" title="visual studio">visual studio (1)</a>
  
    <a class="tag-item" href="/tags/tool/" title="tool">tool (2)</a>
  
    <a class="tag-item" href="/tags/vscode/" title="vscode">vscode (1)</a>
  
</div>
    </section>
    

    
    <!-- 友情链接 -->
    <section class="widget">
        <h3 class="widget-hd"><strong>友情链接</strong></h3>
        <!-- 文章分类 -->
<ul class="widget-bd">
    
        <li>
            <a href="https://gitee.com/Shr9527" target="_blank" title="码云博客">码云博客</a>
        </li>
    
</ul>
    </section>
    
</aside>
<!-- / 侧栏部分 -->
    </div>

    <!-- 博客底部 -->
    <footer class="footer">
    &copy;
    
        2016-2020
    

    <a href="/">AllVar Loves You</a>
</footer>
<div class="back-to-top" id="ALLVAR__backToTop" title="返回顶部">返回顶部</div>

    <!--博客js脚本 -->
    <!-- 这里放网站js脚本 -->

<script src="/js/main.js?v=1590833788386.js"></script>

</body>
</html>